Skip to content

Conversation

VYaswanthKumar
Copy link
Contributor

@VYaswanthKumar VYaswanthKumar commented Oct 11, 2025

Replace ensure_clean_store utility function with the temp_file pytest fixture in pandas/tests/io/pytables/test_time_series.py.

Changes:

  • Remove import of ensure_clean_store from pandas.tests.io.pytables.common
  • Add HDFStore to pandas imports
  • Replace setup_path parameter with temp_file in all test functions
  • Replace context manager usage of ensure_clean_store(setup_path) with HDFStore(temp_file)

Contributes to issue #62435


  • xref TST: Replace ensure_clean utility function with the temp_file pytest fixture #62435 (contributes to this issue)
  • Tests added and passed (existing tests modified to use new fixture)
  • All code checks passed (will run via CI)
  • Added type annotations to new arguments/methods/functions (not applicable - only modifying test code)
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file (not applicable - test refactoring only)

Replace ensure_clean_store utility function with the temp_file pytest fixture in pandas/tests/io/pytables/test_time_series.py.

Changes:
- Remove import of ensure_clean_store from pandas.tests.io.pytables.common
- Add HDFStore to pandas imports
- Replace setup_path parameter with temp_file in all test functions
- Replace context manager usage of ensure_clean_store(setup_path) with HDFStore(temp_file)

Contributes to issue pandas-dev#62435
@VYaswanthKumar
Copy link
Contributor Author

“If the test failure is unrelated to my refactor, please let me know if further changes are needed. Happy to make updates if necessary!”

Copy link
Contributor Author

@VYaswanthKumar VYaswanthKumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the import datetime line at the top of the file as requested for code style compliance. All changes and feedback from the previous review have been addressed. Waiting for CI checks to complete.

@VYaswanthKumar
Copy link
Contributor Author

Restored the import datetime line as requested. All feedback addressed and waiting for CI checks

@swt2c
Copy link
Contributor

swt2c commented Oct 13, 2025

Looks like now you've made a bunch of whitespace changes in pandas/io/excel/_xlsxwriter.py. Why?

Restore original formatting with proper blank lines between methods and sections to keep the PR clean and focused on the actual test changes.
Copy link
Contributor Author

@VYaswanthKumar VYaswanthKumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All unintended whitespace changes have been reverted in pandas/io/excel/_xlsxwriter.py. The PR is now clean and focused only on the meaningful changes in test_time_series.py.

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Oct 13, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 13, 2025
@mroeschke mroeschke merged commit 8d32d57 into pandas-dev:main Oct 13, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @VYaswanthKumar

mraabhijit pushed a commit to mraabhijit/pandas that referenced this pull request Oct 17, 2025
…pandas-dev#62652)

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
eicchen pushed a commit to eicchen/pandas that referenced this pull request Oct 18, 2025
…pandas-dev#62652)

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Style Code style, linting, code_checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants